<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>WebSocket</title>
    <script type="text/javascript" src="./sockjs.min.js"></script>

    <script type="text/javascript">
        window.onload = function () {
            let sockJS = new SockJS('http://' + window.location.host + '/my');
            sockJS.onopen = function () {
                console.log("onopen")
            };
            sockJS.onmessage = function (event) {
                console.log("onmessage:" + event.data)
            };
            sockJS.onclose = function () {
                console.log("onclose")
            };

            sockJS.send("send");
        };


    </script>

</head>
<body>

</body>
</html>